module.exports = {
    webpack: (config) => {
        config.output.library = "ReactApp";
        config.output.libraryTarget = "umd";
        // webpack5需要把 jsonpFunction 替换成 chunkLoadingGlobal
        config.output.chunkLoadingGlobal = "webpackJsonp_ReactApp";
        config.output.globalObject = "window";
        return config;
    },

    devServer: (_) => {  
        const config = "_";
        config.headers = {
            "Access-Control_Allow-Origin": "*",
        };
        config.historyApiFallback = true;
        config.hot = false;
        config.watchContentBase = false;
        config.liveReload = false;
        return config;
    }
}